#include <iostream>
#include <list>
#include <vector>

using namespace std;
int main(int argc, char const *argv[]) {
  /* code */
  vector<int> v = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  list<int> l;
  copy(v.rbegin() + 3, v.rend() - 2, back_inserter(l));
  for (auto it1 = l.begin(); it1 != l.end(); ++it1) {
    cout << *it1 << " ";
  }
  return 0;
}
